package com.homework;
@AutoRunClass
public class Teacher {
    public String name;
    public int age;
    private char gender;

    // 无参构造
    public Teacher() {
    }

    // 全参构造
    public Teacher(String name, int age, char gender) {
        this.name = name;
        this.age = age;
        this.gender = gender;
    }

    // getter和setter

    //无参且公开的方法
    @AutoRunMethod
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    //无参且公开的方法
    @AutoRunMethod
    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    // toString
    @Override
    public String toString() {
        return "Teacher{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", gender=" + gender +
                '}';
    }
}
